<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <title>存定期</title>
    <link rel="stylesheet" href="css/reset.css">
    <link rel="stylesheet" href="css/jiazai.css">
    <style>
        .hea-con {
            position: fixed;
            top: 10px;
            right: 0;
            left: 0;
            box-sizing: border-box;
            padding: 0 20px;
            font-size: 16px;
            color: white;
            opacity: .7;
        }
        
        .content {
            position: fixed;
            top: 90px;
            right: 0;
            left: 0;
            bottom: 0;
            padding: 0 20px;
            box-sizing: border-box;
            overflow: auto;
        }
        
        .com-con>div,
        .com-con>span {
            flex: 1 1 0;
            width: 100%;
            overflow: auto;
            white-space: nowrap;
            text-align: center;
        }
        
        .com-con>span {
            font-size: 14px;
            color: #9197ae;
        }
        
        .money {
            padding-top: 25px;
            font-size: 25px;
            color: white;
        }
    </style>
</head>

<body style="background:#2a2c35;">
    <div id='app'>

        <!-- 加载中动画 -->
        <div id='jiazai-ani' v-if='jiazai'>
            <div class="arc"></div>
            <h1><span>LOADING</span></h1>
        </div>
        <!-- 加载中动画 -->

        <div class='hea-con dis-spa'>
            <img @click='_close()' src="./img/left.svg" width="22px" height="22px">
            <span>
                我的市场
            </span>
            <span style="opacity:0">1</span>
        </div>

        <div class='content'>
            <p class='dis-spa com-con'>
                <span>昨日市场</span>
                <span>全部市场</span>
            </p>
            <div class='dis-spa com-con money'>
                <div>
                    <span v-text='shiData.yesterday'>250000000.00</span>
                </div>
                <div>
                    <span v-text='shiData.all'>25000.00</span>
                </div>
            </div>
        </div>
    </div>
    <script src="js/comm.js"></script>
    <script src="js/vue.min.js"></script>
    <script src="js/jquery.min.js"></script>
    <script>
        var app = new Vue({
            el: '#app',
            data: {
                jiazai: false,
                shiData: {}
            },
            created: function() {
                this.getData();
                console.log(localStorage.getItem('cc_user'))
            },
            methods: {
                getData: function() {
                    var This = this;
                    This.jiazai = true;
                    var user = JSON.parse(localStorage.getItem('cc_user'));
                    _post(SHICHANG, {
                        userid: user.userid,
                        session: user.session
                    }, function(data) {
                        This.jiazai = false;
                        if (data.status == 1) {
                            This.shiData = data.back;
                        }
                    });
                }
            }
        });
    </script>
</body>

</html>